<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>File: README</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



  <div id="fileHeader">
    <h1>README</h1>
    <table class="header-table">
    <tr class="top-aligned-row">
      <td><strong>Path:</strong></td>
      <td>README
      </td>
    </tr>
    <tr class="top-aligned-row">
      <td><strong>Last Update:</strong></td>
      <td>Thu Dec 02 19:30:01 +0100 2010</td>
    </tr>
    </table>
  </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <h1>rtriplify</h1>
<h2>What is rtriplify</h2>
<p>
rtriplify is a ruby clone of the triplify-php version. It is used to create
an rdf-mapping of your existing database and serves it&#8216;s content out
to the (semantic)-web. It gives you several opportunities to improve your
application with semantic-data in several RDF- and output formats. The
following RDF-formats are supported:
</p>
<ul>
<li>RDF/N3

</li>
<li>RDFa (eperimental feature - please see details)

</li>
</ul>
<p>
You can serve these formats in the following output-formats:
</p>
<ul>
<li>json (N3)

</li>
<li>RDF/N3 file (N3)

</li>
<li>as hidden div in the view of your application (RDFa)

</li>
</ul>
<h2>How to serve data</h2>
<p>
You have to do several steps to configure and run a rtriplify instance with
your Application. For experienced users just do the following steps:
</p>
<pre>
 (1) install rtriplify

 (2) add &quot;triplify.yml&quot; file to your app/config folder

 (3) configure the mapping

 (4) add route for rtriplify controller (optional)

 (5) enjoy it
</pre>
<p>
For further information, we are now going on detail:
</p>
<h3>Install rtriplify</h3>
<p>
The easiest way to install rtriplify is by using ruby gem (of course you
need a running ruby/rails environment). Just open your command-prompt and
input:
</p>
<pre>
 gem install rtriplify
</pre>
<p>
Another possibility is to install triplify as rails-plugin. In this case,
go to the root folder of you application and install it by executing the
following command on your commandline:
</p>
<pre>
 ruby script/plugin install http://github.com/rtriplify/rtriplify.git
</pre>
<p>
Of course you can download the source from github and install it manually
too.
</p>
<h3>Add config</h3>
<p>
rtriplify just loads, if you have placed a &quot;triplify.yml&quot; config
file in the &quot;app/config&quot; folder of your application. Please add
such a file. Easily download the sample config file from <a
href="http://abc.de">abc.de</a>. This config file located at
lib/config/triplify_demo.yml folder of your triplify installation
directory. (if installed as plugin you can find it at
your-app-folder/vendor/plugin/rtriplify/lib/config/triplify_demo.yml)
</p>
<p>
gem install rtriplify
</p>
<p>
then place a triplify.yml file in the config folder of your
RoR-application. Probably it&#8216;s the best idea to use the sample config
file included in the gem or you can download a clean sample file here [3]
too.
</p>
<p>
Usaly the sample config has all configuration possibilitys inside of it and
it&#8216;s well documented. I think you can start now and change the config
so that it will fit to your Application.
</p>
<p>
Now, you want to see your nice RDF-Data?
</p>
<p>
just add following route in the route.config:
</p>
<pre>
 map.connect 'triplify/*specs', :controller =&gt; 'triplify', :action =&gt; &quot;tripleize&quot;
</pre>
<p>
that&#8216;s it. Now just go to <a
href="http://your-app.com/triplify">your-app.com/triplify</a>/ and you will
get the full RDF dump of your database. (If you haven&#8216;t changed the
data-depth part in the config)
</p>
<p>
That&#8216;s all the magic. For detailed documentation I&#8216;ll go on
detail on some of the config sections.
</p>
<p>
You can
</p>
<p>
In addition you have the possibility to generate RDFa -Data and place it
inside of your webpage as a hidden div. Please be aware that this is not
the clean way to serve your content as RDFa. But I think, if you have
generated the mapping file for your database it&#8216;s just the
consequence to place RDFa on your page instead. RTriplify gives you the
right tools to place RDFa tags on your Webpage without having to do a full
code review of your templates. And of course, search engines like google
and yahoo already watch for these tags. Google already rewards RDFa tags
with some specials. For further informations please see here [1] or [2]
here
</p>
<h3>Links:</h3>
<p>
[1]<a
href="http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=99170">www.google.com/support/webmasters/bin/answer.py?hl=en&answer=99170</a>
[2]<a
href="http://developer.yahoo.com/searchmonkey">developer.yahoo.com/searchmonkey</a>/
(sadly this project is discontinued)
</p>
<h3>Links:</h3>
<dl>
<dt>3</dt><dd>sample config

</dd>
</dl>
<p>
Copyright (c) 2010 Nico Patitz, released under the MIT license
</p>

    </div>


   </div>


  </div>


    <!-- if includes -->

    <div id="section">





      


    <!-- if method_list -->


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>